package com.codegeek.project.slope.service.impl;

import com.codegeek.project.slope.domain.SlopeSubscribeDetail;
import com.codegeek.project.slope.mapper.SlopeSubscribeDetailMapper;
import com.codegeek.project.slope.service.ISlopeSubscribeDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订阅详情Service业务层处理
 *
 * @author codegeek
 * @date 2020-02-17
 */
@Service
public class SlopeSubscribeDetailServiceImpl implements ISlopeSubscribeDetailService {
    @Autowired
    private SlopeSubscribeDetailMapper slopeSubscribeDetailMapper;

    /**
     * 查询订阅详情
     *
     * @param subscribeDetailId 订阅详情ID
     * @return 订阅详情
     */
    @Override
    public SlopeSubscribeDetail selectSlopeSubscribeDetailById(Long subscribeDetailId) {
        return slopeSubscribeDetailMapper.selectSlopeSubscribeDetailById(subscribeDetailId);
    }

    /**
     * 查询订阅详情列表
     *
     * @param
     * @return 订阅详情
     */
    @Override
    public List<SlopeSubscribeDetail> selectSlopeSubscribeDetailList(SlopeSubscribeDetail rec) {
        return slopeSubscribeDetailMapper.selectSlopeSubscribeDetailList(rec);
    }

    /**
     * 新增订阅详情
     *
     * @param slopeSubscribeDetail 订阅详情
     * @return 结果
     */
    @Override
    public int insertSlopeSubscribeDetail(SlopeSubscribeDetail slopeSubscribeDetail) {
        return slopeSubscribeDetailMapper.insertSlopeSubscribeDetail(slopeSubscribeDetail);
    }

    /**
     * 修改订阅详情
     *
     * @param slopeSubscribeDetail 订阅详情
     * @return 结果
     */
    @Override
    public int updateSlopeSubscribeDetail(SlopeSubscribeDetail slopeSubscribeDetail) {
        return slopeSubscribeDetailMapper.updateSlopeSubscribeDetail(slopeSubscribeDetail);
    }

    /**
     * 批量删除订阅详情
     *
     * @param subscribeDetailIds 需要删除的订阅详情ID
     * @return 结果
     */
    @Override
    public int deleteSlopeSubscribeDetailByIds(Long[] subscribeDetailIds) {
        return slopeSubscribeDetailMapper.deleteSlopeSubscribeDetailByIds(subscribeDetailIds);
    }

    /**
     * 删除订阅详情信息
     *
     * @param subscribeDetailId 订阅详情ID
     * @return 结果
     */
    @Override
    public int deleteSlopeSubscribeDetailById(Long subscribeDetailId) {
        return slopeSubscribeDetailMapper.deleteSlopeSubscribeDetailById(subscribeDetailId);
    }
}
